package xyz.xuminghai.javafx_learn.scene.shape;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.scene.shape.Ellipse;
import javafx.stage.Stage;

/**
 * 2023/8/7 16:25 星期一<br/>
 * Ellipse类创建一个具有指定大小和位置（以像素为单位）的新椭圆
 *
 * @author xuMingHai
 */
public class EllipseApp extends Application {

    private final BorderPane root = new BorderPane();


    public static void main(String[] args) {
        Application.launch(args);
    }

    @Override
    public void init() {
        Ellipse ellipse = new Ellipse(80.0, 40.0);
        root.setCenter(ellipse);
    }

    public void start(Stage primaryStage) {
        primaryStage.setTitle(getClass().getSimpleName());
        Scene scene = new Scene(root, 800, 600);
        primaryStage.setScene(scene);
        primaryStage.show();
    }

}
